class Dog {
  public name: string;
  constructor(name: string) {
    this.name = name;
  }
}

const animalFunctionality = {
  walk: () => console.log('Walking!'),
  sleep: () => console.log('Sleeping!'),
};

const dogFunctionality = {
  bark: () => console.log('Woof!'),
  wagTail: () => console.log('Wagging my tail!'),
  play: () => console.log('Playing!'),
  walk() {
    super.walk();
  },
  sleep() {
    super.sleep();
  },
};

Object.assign(dogFunctionality, animalFunctionality);
Object.assign(Dog.prototype, dogFunctionality);

const myDog = new Dog('xiaohei');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(myDog as any).play();

export {};
